home *** CD-ROM | disk | FTP | other *** search
- x = _X + _parent._x;
- y = _Y + _parent._y;
- width = _width / 2;
- if(x - width < _root.mascot._x && _root.mascot._x < x + width && (y - _root.mascot.jumpspeed < _root.mascot._y + 40 && _root.mascot._y + 40 < y + 20) && _root.mascot.jumping != true)
- {
- _root.mascot.air = false;
- _root.mascot._y = y - 40;
- if(mascot != true)
- {
- _root.mascot.platform_contact = _root.mascot.platform_contact + 1;
- mascot = true;
- }
- if(_name == "water" && _root.mascot.water != true)
- {
- _root.mascot.water = true;
- _root.splash._x = _root.mascot._x;
- _root.splash._y = _root.mascot._y;
- _root.splash.play();
- }
- }
- else if(mascot == true)
- {
- if(_root.mascot.platform_contact == 1)
- {
- _root.mascot.air = true;
- }
- _root.mascot.platform_contact--;
- if(_root.mascot.water == true && _root.mascot.jumping == true && _root.splash._currentFrame == 1)
- {
- _root.splash._x = _root.mascot._x;
- _root.splash._y = _root.mascot._y;
- _root.splash.play();
- }
- _root.mascot.water = false;
- mascot = false;
- }
- if(_name == "water" && (x - width < _root.mascot._x && _root.mascot._x < x + width))
- {
- land_check = true;
- _root.mascot.land = false;
- }
- else if(land_check != false)
- {
- _root.mascot.land = true;
- land_check = false;
- }
-